<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ms-theme-blue">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <%@ include file="/WEB-INF/include/submenu.jsp"%>

  <div class="container-fluid ms-container has-ms-sidemenu">

    <ol class="ms-breadcrumb breadcrumb">
      <li class="active">过往业务信息统计</li>
    </ol>

    <div class="ms-content-layout">
    
      <div class="ms-operation-bar no-margin no-bottom-border clearfix">
        <div class="ms-operation-group pull-right">
          <a href="${ctx.host}/supplier-reports/business-history-search" data-target="#search" data-toggle="modal" class="btn ms-btn ms-btn-blue">
            <i class="glyphicon glyphicon-search"></i>&nbsp;&nbsp;过滤查询
          </a>
        </div>
      </div>
    
      <table class="table table-hover ms-table">
        <thead>
          <tr>
						<th>供方代码</th>
						<th>供方简称</th>
            <th>供方类型</th>
            <th>供方审核状态</th>
            <th>供方业务类型</th>
            <th>供方业务性质</th>
						<th>合同起始日期</th>
						<th>合同终止日期</th>
						<th>合同甲方</th>
						<th>合同乙方</th>
            <th>承运品牌</th>
            <th>出发地</th>
            <th>目的地</th>
            <th>投入运力板</th>
            <th>月均运量</th>
            <th>汽运业务类型</th>
            <th>服务仓库所在地</th>
            <th>投入人员</th>
            <th>月均业务量</th>
            <th>仓储业务类型</th>
          </tr>
        </thead>
        
        <tbody>
	        <c:forEach var="result" items="${results}">
	          <tr>
	            <td>${result.code}</td>
	            <td>${result.shortName}</td>
              <td>${result.supplierType}</td>
              <td>${result.supplierStatus}</td>
              <td>${result.businessType}</td>
              <td>${result.businessNature}</td>
              <td><fmt:formatDate pattern="yyyy-MM-dd" value="${result.startDate}"/></td>
              <td><fmt:formatDate pattern="yyyy-MM-dd" value="${result.endDate}"/></td>
              <td>${result.consignor}</td>
              <td>${result.executor}</td>
              <td>${result.brand}</td>
              <td>${result.fromLoadPlace}</td>
              <td>${result.toLoadPlace}</td>
              <td>${result.vehicleNum}</td>
              <td>${result.averageCapacity}</td>
              <td>${result.transType}</td>
              <td>${result.serviceLocation}</td>
              <td>${result.staffNum}</td>
              <td>${result.averageTraffic}</td>
              <td>${result.wareType}</td>
	          </tr>
	        </c:forEach>
        </tbody>
        
        <tfoot>
          <tr>
            <td colspan="21" class="no-vertical-padding">
              <div class="pull-left">
                <jsp:include page="/WEB-INF/include/page.jsp">
                  <jsp:param name="url" value="${ctx.host}/supplier-reports" />
                  <jsp:param name="queryString" value="${queryString}" />
                </jsp:include>
              </div>
              
              <div class="pull-right">
                <c:if test="${page.totals > 0}">
                  <a href="${ctx.host}/supplier-reports/business-history-export?${queryString}&per_page=${config.everyPage}&page=${page.currentPage}" class="btn btn-default ms-export">输出当前记录</a>
                  <a href="${ctx.host}/supplier-reports/business-history-export?${queryString}&per_page=${config.limit}&page=1" class="btn btn-default ms-export">输出所有记录</a>
                </c:if>
              </div>
            </td>
          </tr>
        </tfoot>
      </table>

    </div> 
  </div>
  
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource type="script" root="${ctx.resource}/build" src="js/page/report/supplier-report/business-history-list.js" />
  <script type="text/javascript">
    require(['page/report/supplier-report/business-history-list'], function(page) {
      page.init()
    })
  </script>
  
</body>
</html>